//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	FormsChooseRulesInstance.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

using Smart.Common.Rules;

namespace Smart.Common.Forms
{
	/// <summary>
	/// Form choose rules instance
	/// </summary>
	public class FormsChooseRulesInstance : IRulesInstance
	{
		/// <summary>
		/// Forms context
		/// </summary>
		public FormsContext Ctx { get; set; }

		/// <summary>
		/// Form choose rules
		/// </summary>
		public MetaFormsRules ChooseRules { get; set; }

		/// <summary>
		/// Choosed form name
		/// </summary>
		public string ChoosedFormName { get; set; }

		/// <summary>
		/// Instance rules
		/// </summary>
		public object Rules
		{
			get { return ChooseRules; }
		}

		/// <summary>
		/// Form choose rules instance
		/// </summary>
		public FormsChooseRulesInstance(MetaFormsRules chooseRules, FormsContext ctx)
		{
			ChooseRules = chooseRules;
			Ctx = ctx;
		}
	}
}